UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6UvRhIHSHiR8PGqT8bhkN5fRNYUXvAWQiJMZE4ADAPE='
WHERE
key_id = 'd62a8e85e68a9ad1a1656b830e3c942a359277ab5e32de2d11a2b3ff122ce5ba'
AND (
token = '6UvRhIHSHiR8PGqT8bhkN5fRNYUXvAWQiJMZE4ADAPE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)