UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4AX+kxKUce8rItgbMmFEpJhYD41x0+yw/Tkk3EPmzh8=' 
WHERE 
  key_id = '4034f8b8a3ed0d3e3057fbfe9cb94fcaf13bad4e3131223d7b73a3bcc446ee77' 
  AND (
    token = '4AX+kxKUce8rItgbMmFEpJhYD41x0+yw/Tkk3EPmzh8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017