UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7n8kT/elIJ3OhuksdGY8RQtEwLkXWaGoY0Zse2G7gJU='
WHERE
key_id = '4650b15c12a5436127915d4bdb6cb07bca1bb673830bf0ffdbcf0730a506bd86'
AND (
token = '7n8kT/elIJ3OhuksdGY8RQtEwLkXWaGoY0Zse2G7gJU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)