UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GVCMk/mpN61mqRgoQGrN+3Uf/MNvIA6oL3Vd2v3BLkk=' 
WHERE 
  key_id = '93363963230231198706ac276968a3e8ba05ba3a5b005e363b55886486f53432' 
  AND (
    token = 'GVCMk/mpN61mqRgoQGrN+3Uf/MNvIA6oL3Vd2v3BLkk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031