UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PlsmhHrVREHlJ+psRUaxcoj8BrYaiyt1SHc/kCJT3O0=' 
WHERE 
  key_id = '9b26798f4eeb8c133a5ae562f7668880e6f2aa1e9d56a0c39dff97bc4ab8ac2b' 
  AND (
    token = 'PlsmhHrVREHlJ+psRUaxcoj8BrYaiyt1SHc/kCJT3O0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034