UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'R2Q5ZMs16sj90L1F8d/3QmtVtSDm+w4bvmC6WYOJI2s=' 
WHERE 
  key_id = '2759d0b93710c7c182e9f78fbfb8abe2f19709b3aa769e8fe907c94f1dd304d4' 
  AND (
    token = 'R2Q5ZMs16sj90L1F8d/3QmtVtSDm+w4bvmC6WYOJI2s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00065