UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hA1eLYapY0BPnBPbygjtXr+6BFq0uxE5Zo14JAUZl9o='
WHERE
key_id = '43a281ad08016a96ef2fdb580a2608e92ce7aea636c2bd1db8d0ca1364b478f1'
AND (
token = 'hA1eLYapY0BPnBPbygjtXr+6BFq0uxE5Zo14JAUZl9o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)