UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4ACwmu2wGDdD+ILwC1BqSoynUXKM0u4PUJWBP9qJtc4='
WHERE
key_id = 'e92b8a11710810b7968c669f494064b5520cd04e7eb80b0662bd4d2464d0a6b2'
AND (
token = '4ACwmu2wGDdD+ILwC1BqSoynUXKM0u4PUJWBP9qJtc4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)