UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't/N4lkQ/QjWv62pbjQyEIpuKlywlC73kLpsHePblBpQ='
WHERE
key_id = '9c072d229ffd4ea72ffcc3ce40cce6495e5d0e08da3ede86235b94af27e69181'
AND (
token = 't/N4lkQ/QjWv62pbjQyEIpuKlywlC73kLpsHePblBpQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)