UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JBA3CEBPPM74vi4LHB/Sq9D95momWjIqQ7GJi21iUro='
WHERE
key_id = 'ef6fba3a36458f1faf53816ef2824e376db367a7fbc703847c950c92c8a1a7ff'
AND (
token = 'JBA3CEBPPM74vi4LHB/Sq9D95momWjIqQ7GJi21iUro='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)