UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'asmBYMzXryIA2HfbId/L4d5KmC+Fqrxp9irV0BM3IqE='
WHERE
key_id = '9e663da2967f267514fe93682930f37d2a55670d40a6f1b7c689afa0a91225fa'
AND (
token = 'asmBYMzXryIA2HfbId/L4d5KmC+Fqrxp9irV0BM3IqE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)