UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LKUfmQCW/CKtGRE7rlaaUjUrfJFPGuZtBb//673sEhU=' 
WHERE 
  key_id = '59fd23de84c33094262ba20d2344a2f33d76787c80978b416f7db19d1462e69f' 
  AND (
    token = 'LKUfmQCW/CKtGRE7rlaaUjUrfJFPGuZtBb//673sEhU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019