UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's/onTeLnllH0ux7TmcR05+pznMX5lpsnzP9oVB6FFK8='
WHERE
key_id = '41888612872ade925b89d04ce1f1250fe5c63da31e9d79fccd05f8a2e953642b'
AND (
token = 's/onTeLnllH0ux7TmcR05+pznMX5lpsnzP9oVB6FFK8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)