UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GNWZBmQEyXgJYGrgQK2Xc+k/4nlWxJ/KM7izg2xEMGo='
WHERE
key_id = 'b7d8960ca7fc39b16472a3d81b9e9165294994348c3df6e3cc67d5d857926116'
AND (
token = 'GNWZBmQEyXgJYGrgQK2Xc+k/4nlWxJ/KM7izg2xEMGo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)