UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E+yxMDhfp1/70nmdySxEebUmPeOwcu5UKIzb2s9QlAI='
WHERE
key_id = '5698e024900abea6f2547c7058f4cf7dda3c5fb6a07e125b7ece106d4380cf57'
AND (
token = 'E+yxMDhfp1/70nmdySxEebUmPeOwcu5UKIzb2s9QlAI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)