UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JQghB/D4YwgEdQ8a7rvlOwJ2r9GDU8jhm9YERvHH374=' 
WHERE 
  key_id = '08de04934d998747b93c61ae598cd1ab3cc8f16788c2c69e4c12dd99ea08af45' 
  AND (
    token = 'JQghB/D4YwgEdQ8a7rvlOwJ2r9GDU8jhm9YERvHH374=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043