UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Yu3qe7g+6yx5ZuYQjYvknrvI/GRHRZOR5n2anFHHKqA='
WHERE
key_id = '44fe3b340c7f91f0c2bbd9fea9314ee5096e8c61a9c0da1bff67c309504d5649'
AND (
token = 'Yu3qe7g+6yx5ZuYQjYvknrvI/GRHRZOR5n2anFHHKqA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)