UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SphjobYKJDYV5mpDn+9O5sJenB1tByqiTwLzXaNMIEY='
WHERE
key_id = 'b6ec06bd7464629720e3c780213b3e2a4193e1be1ba9d02c58456dcf3a93e61d'
AND (
token = 'SphjobYKJDYV5mpDn+9O5sJenB1tByqiTwLzXaNMIEY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)