UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/m+AbCNDAhrdgDMATD9B5lPVveK/CFG0utbOb1lRCrw='
WHERE
key_id = '495923bd5567381b3f261af746711aaa31f028e26796e651f9aec7cc9b79b917'
AND (
token = '/m+AbCNDAhrdgDMATD9B5lPVveK/CFG0utbOb1lRCrw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)