UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aKKnT7Fd/ZQVLcy6WfpOmOdY5IgiDDXBWmnUjGlqFyA='
WHERE
key_id = '954d1f8dd136d228213f9a425f1fd5aa899ad6c090cdde46b9b11ccc8a7c17fc'
AND (
token = 'aKKnT7Fd/ZQVLcy6WfpOmOdY5IgiDDXBWmnUjGlqFyA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)