UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1I4w6tMQpOOH9FRVm9MDlNpzE1sDHPqKsb7nINs9r/o='
WHERE
key_id = '5265630f24cc12e6e68c54d7d3c7aa3fe61ca28c7575269336fa4b5c3f48be19'
AND (
token = '1I4w6tMQpOOH9FRVm9MDlNpzE1sDHPqKsb7nINs9r/o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)