UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '33d6ECH8c5DcZsMRTxNS6i4/rebxgdldi4kwzdev0Lw=' 
WHERE 
  key_id = 'd85d49db8bb432b7b5d9512c0f6e95fa2fbc354d6b1d685afdf1e13033971ca1' 
  AND (
    token = '33d6ECH8c5DcZsMRTxNS6i4/rebxgdldi4kwzdev0Lw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048