UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/70ZYgghkoSq41DaqSGYUvHgvbvLtkbmIIE+4104JyA='
WHERE
key_id = 'd8292d7736c7859e9756837b2cca3253e41fecf3f255f890fb2348ea93c63afe'
AND (
token = '/70ZYgghkoSq41DaqSGYUvHgvbvLtkbmIIE+4104JyA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)