UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WyahIsqIptdRkEFo4KrUDrGfoTvzYp5fn+vJLsCNsSg=' 
WHERE 
  key_id = 'c2b011b56d88a751fa97b3cffd9484b324637fc918bc5d1e43b95a4d053164db' 
  AND (
    token = 'WyahIsqIptdRkEFo4KrUDrGfoTvzYp5fn+vJLsCNsSg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026