UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2Cjuzr6icxnm4qnkuGazIW2VpQKyrg51I5Sq5rEdafU='
WHERE
key_id = '04eb123a24d0b1e1b769ad94d8fc925538a4cdb5ef4b88fdeba8ac0cdc801fb7'
AND (
token = '2Cjuzr6icxnm4qnkuGazIW2VpQKyrg51I5Sq5rEdafU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)