UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9dMpZKRv+AlLUVjh6WGnp4RAqTqFb7dGB/XjcpqM27U=' 
WHERE 
  key_id = '4c07d1f81faf38ffd9d2c761efe9a7bdc4bfece76ed48448db00d18fcc621218' 
  AND (
    token = '9dMpZKRv+AlLUVjh6WGnp4RAqTqFb7dGB/XjcpqM27U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033