UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jOkLpVDRnjC08sivZgIqidkyrEbqUC0BMjBB5/UQrJk=' 
WHERE 
  key_id = '48f8e444357d48d827545f89a4c6fafc9a8cabfd5a4a8dabd515351cea6268b8' 
  AND (
    token = 'jOkLpVDRnjC08sivZgIqidkyrEbqUC0BMjBB5/UQrJk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039