UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'POwQyHNgl2RvoAMoRY7hp4GVNat4hwDIEpLkldRiPWk=' 
WHERE 
  key_id = '116651296db885e30e9a589a9c45c91f4af2757aa215345b609f62f9c9157807' 
  AND (
    token = 'POwQyHNgl2RvoAMoRY7hp4GVNat4hwDIEpLkldRiPWk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024