UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '02Jwld/JbmVVb92JjNFBWfNyv99Ut5i/zQKsDOTQ438='
WHERE
key_id = '60d84369e14b0d35a8f3f760a7a552522dd501e29c688562750cd1455da78b99'
AND (
token = '02Jwld/JbmVVb92JjNFBWfNyv99Ut5i/zQKsDOTQ438='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)