UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '75b0njxFt8NEns1D0QUevxNiGKwCvsr1YBMWLZw6zaE='
WHERE
key_id = '5adad447b64667fb6c72bd0d27012eed60f98deb80c435a34fe05978aed8f3b4'
AND (
token = '75b0njxFt8NEns1D0QUevxNiGKwCvsr1YBMWLZw6zaE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)