UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DFLbGmUWSfV7dPRUmO7RXaiTOL/v2ZVFTcufiJIA0xk=' 
WHERE 
  key_id = 'f0f4109fcd52aec6d6489b5ca9b763ea498603cad69aa2a7160d3eb13d2a1dd9' 
  AND (
    token = 'DFLbGmUWSfV7dPRUmO7RXaiTOL/v2ZVFTcufiJIA0xk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049