UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jqovM4T8hMjJvswgoJAMy5A/Pk22ngOX3nCW91T+XKE=' 
WHERE 
  key_id = '7dceab2c2a1272a73b2a6bd9cf22805a2b5996d1ed158c644559ad49c19e7efe' 
  AND (
    token = 'jqovM4T8hMjJvswgoJAMy5A/Pk22ngOX3nCW91T+XKE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044