UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vb+gTK6p6Z/cvY7MuEtpAOZ7ppgwOLyQXKlFw0KaBf8='
WHERE
key_id = '6f5fefdc40e8d810e09fe7bc5f2d53aa7736ed9292420963799ee2f1837f70bb'
AND (
token = 'vb+gTK6p6Z/cvY7MuEtpAOZ7ppgwOLyQXKlFw0KaBf8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)